package com.kylin.common.exception;

/**
 * 系统故障异常
 * 此种异常不属于业务逻辑部分，而是由系统故障引起，系统应该有统一的应对措施，
 * 所以不用显式抛出，而是在某个环节由系统统一处理
 * @author liangzh
 *
 */
public class SystemException extends RuntimeException { 

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Object values[];
	
	private String aMessageKey;
	
    public SystemException() {
        
    }
    public SystemException(String aMessageKey)
    {
        super(aMessageKey);
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Object value0)
    {
        super(aMessageKey);
        values = (new Object[] { value0 });
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Object value0, Object value1)
    {
        super(aMessageKey);
        values = (new Object[] { value0, value1 });
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Object values[])
    {
        super(aMessageKey);
        this.values = values;
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Throwable cause)
    {
        super(aMessageKey, cause);
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Throwable cause, Object value0)
    {
        super(aMessageKey, cause);
        values = (new Object[] { value0 });
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Throwable cause, Object value0, Object value1)
    {
        super(aMessageKey, cause);
        values = (new Object[] { value0, value1 });
        this.aMessageKey = aMessageKey;
    }

    public SystemException(String aMessageKey, Throwable cause, Object values[])
    {
        super(aMessageKey, cause);
        this.values = values;
        this.aMessageKey = aMessageKey;
    }

	public Object[] getValues(){
		return values;
	}

 	public String getaMessageKey(){
	    return aMessageKey;
	}
 }
